package org.teremail.mailbox;

import java.util.List;

import org.teremail.message.Message;

/**
 * Interface for a user's mailbox.
 * 
 * @author Michael Barker
 *
 */
public interface Mailbox {
    
    public final static String DELIM = "/";

    /**
     * Get a specified folder.
     * 
     * @param path
     * @return
     * @throws FolderNotExistsException
     */
    Folder getFolder(Path path) throws FolderNotExistsException;

    String getUser();

    Folder createFolder(Path path) throws FolderExistsException;

    void remove(Path path) throws FolderNotExistsException;

    void renameFolder(Path fromPath, Path toPath) throws FolderExistsException, FolderNotExistsException;

    void deliver(Message m);

    List<Folder> getFolders(Path root);

}
